package com.home.school.bean;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import lombok.Data;

@Data
@TableName(value = "t_user")
public class TUser {
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户名
     */
    @TableField(value = "username")
    private String username;

    /**
     * 密码
     */
    @TableField(value = "password")
    private String password;

    @TableField(value = "phone")
    private String phone;

    /**
     * 性别
     */
    @TableField(value = "sex")
    private Integer sex;

    /**
     * 学校地址
     */
    @TableField(value = "school_address")
    private String schoolAddress;

    /**
     * 用户类型
     */
    @TableField(value = "type")
    private Integer type;

    /**
     * 年龄
     */
    @TableField(value = "age")
    private Integer age;

    /**
     * 0 启用 1 禁用
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 默认  0 未删除 1删除
     */
    @TableLogic
    @TableField(value = "deleted")
    private Integer deleted;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    public static final String COL_ID = "id";

    public static final String COL_USERNAME = "username";

    public static final String COL_PASSWORD = "password";

    public static final String COL_PHONE = "phone";

    public static final String COL_SEX = "sex";

    public static final String COL_SCHOOL_ADDRESS = "school_address";

    public static final String COL_TYPE = "type";

    public static final String COL_AGE = "age";

    public static final String COL_STATUS = "status";

    public static final String COL_DELETED = "deleted";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_TIME = "update_time";
}